package com.vincent.javacourse.mapper;

import com.vincent.javacourse.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2021-12-24
 */
public interface TeacherMapper extends BaseMapper<Teacher> {

    @Select("SELECT tel,password,salt FROM teacher WHERE tel = #{tel}")
    Teacher selectByTel(@Param("tel") String tel);
    @Update("UPDATE teacher SET password = #{psw} ,salt = #{salt} WHERE tel = #{tel}")
    int updateByTel(@Param("tel") String tel,String psw,String salt);
}
